home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 758 < prev    next >
Internet Message Format  |  1996-08-06  |  3KB

  1. Path: solon.com!not-for-mail
  2. From: seebs@solutions.solon.com (Peter Seebach)
  3. Newsgroups: comp.std.c,comp.lang.c.moderated
  4. Subject: Re: printf() format extensions - looking for beta testers...
  5. Date: 17 Apr 1996 15:32:04 -0500
  6. Organization: Usenet Fact Police (Undercover)
  7. Approved: seebs
  8. Message-ID: <4l3kg4$avi@solutions.solon.com>
  9. References: <4koecq$8up@solutions.solon.com> <4kr74a$k8o@solutions.solon.com> <4ksk72$rm6@solutions.solon.com> <4l33qn$7rv@solutions.solon.com>
  10. Reply-To: seebs@solon.com
  11. NNTP-Posting-Host: solutions.solon.com
  12.  
  13. In article <4l33qn$7rv@solutions.solon.com>,
  14. Sean 'Captain Napalm' Conner <spc@gate.net> wrote:
  15. >In article <4ksk72$rm6@solutions.solon.com> seebs@solon.com writes:
  16. > >In article <4kr74a$k8o@solutions.solon.com>,
  17. > >Whatever you want; it's just that if you change %#, you change the behavior
  18. > >of existing legal programs.
  19.  
  20. >  Existing legal programs using your printf()?  
  21.  
  22. No... I mean that, if this extension or change were adopted, the goal is that
  23. all currently defined programs continue to be defined to do the same thing,
  24. and the changes will affect only code using new features.
  25.  
  26. Given that, though, if (using this extension) you were to change the behavior
  27. of the # character in a printf format, previously written code would change in
  28. behavior.  This is a feature, sort of, but is one to be wary of.
  29.  
  30. >  Again, existing code you wrote?  Gee, just like make requiring tabs (and
  31. >only tabs).  Can't fix it, because too many make files would "break" (sorry,
  32. >my anti-Unix bias is showing 8-)
  33.  
  34. I'm not sure how a makefile using tabs would break on a make allowing
  35. tabs-or-spaces, but that's atopical; feel free to email me with an example.
  36.  
  37. No, I mean existing code *anyone* wrote; the goal is to change the behavior of
  38. no existing program, and make it possible for people to use the new features
  39. as consistently as possible.
  40.  
  41. >  But you still have the problem of overloading (what if I wanted to use %<
  42. >for something?).
  43.  
  44. Then you'd change it.  My current design allows you to make %d always print a
  45. 1.  You are not required to use the standard set of flags.  (This is a quality
  46. of programmer issue.)  The idea would be to offer some new format flags,
  47. and then also provide a generic way to add new ones, or replace old ones.
  48.  
  49. I'm hoping to get this or a similar proposal added, because it would make my
  50. lifie immensely easier.  I'm still looking at similar proposals.  I have
  51. decided that I'm probably going to have to choose a different way to pass data
  52. around, though.
  53.  
  54. -s
  55. -- 
  56. Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
  57. C/Unix wizard -- C/Unix questions? Send mail for help.  No, really!
  58. Unsolicited email is not welcome, and will be billed for at consulting rates.
  59. The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
  60.